import React from "react";

const ErrorMessage = ({error}) => {
  return (
      <div className="error">
        <h2 className="message">出了点问题</h2>
        <p>我们仍在!</p>
        <pre>{error.toString()}</pre>
        <code>{error.stack || error.stacktrace || '没有可用的错误栈'}</code>
        <button className="block">
          <a
            href="https://github.com/chunLWJ"
            target="_blank"
            rel="noreferrer noopener"
          >
            前往 Github 提交错误
          </a>
        </button>
      </div>
  )
};

export default ErrorMessage;
